home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The PC-SIG Library 10
/
The PC-Sig Library - Shareware for the IBM PC and Compatibles (PC-SIG)(Tenth Edition Disks 1-2804)(1991).iso
/
PC_SIGCD
/
12
/
9
/
DISK1298.ZIP
/
CHAP12.DOC
< prev
next >
Wrap
Text File
|
1989-01-23
|
10KB
|
475 lines
CHAPTER 12 - MACROS, LEARN COMMAND AND
EXTENDED CHARACTER SET
3by5 provides Macros that can be used to speed data entry
or perform a sequence of routine commands.
A 3by5 Macro file consists of a 3by5 file with 26 fields: A
through Z. Each record in the file can contain a set of
macros that can be loaded into memory. This means that
the maximum size of a set of macros is limited to 4800
bytes. Larger macros may be simulated by using the
Utilities-Run Command.
Macros A through W and Y may be executed by holding the
<Alt> key and pressing the corresponding letter. The
contents of the macro will be entered as though you typed
them at the key board.
There are two special macros: <Alt-X> and <Alt-Z>.
165
3by5 Chapter 12
<ALT-X> Extended Character Set Macro
The <Alt-X> macro is used to execute the Extended
Character Set Macro. This macro is used to enter
characters beyond the standard ASCII range (e.g. Greek
and European characters).
Press <Alt-X>, and the following menu will be displayed at
the bottom of the screen:
_____________________________________________________________________
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
_____________________________________________________________________
3by5 comes with a file called MACRO.3X5. It contains
several macro sets of general use.
Select a subset of extended characters by pressing A
through Z. The program will then display the characters
available. Press the letter above the character to be
entered.
166
MACROS
<ALT-Z>
The <ALT-Z> command is used to display the first line of
any of the available macros. Press <ALT-Z> and the
following menu will be displayed:
_____________________________________________________________________
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Contents of macro dislpayed on this line
_____________________________________________________________________
Use the space bar, the back space key or the cursor key
to move to any letter and the first line of each macro will
be displayed. Type the corresponding letter or press
<Enter> and the selected macro will be executed.
167
3by5 Chapter 12
Designing Macros
A 3by5 macro file has records with 26 fields. The fields
are named A through Z. Macros follow the same rules as
3by5Auto files.
The ~ character is used to indicate the <Enter> key.
The ` character is used to indicate the <Esc> key.
Special key sequences can be entered in 3by5 macros by
using the back slash character "\" along with a three digit
code. The code value is equal to the IBM BIOS key scan
code plus 256. For example, the scan code for the <F4>
key is 62 and it can entered as "\318". The back slash
must be followed by three decimal digits. Two back
slashes in a row "\\" are treated as one back slash. The
Basic manual that comes with the computer lists the key
scan codes for the function keys.
The last instruction of a Macro may be a call to another
Macro or the execution of a 3by5 Program File Record.
168
MACROS
LEARN COMMAND
The Learn Command can be used to store key strokes in
the Temporary Text Buffer 3by5 uses for copying and
moving blocks of text. Commands and text are stored
together.
Press <Ctrl-F10> and the temporary buffer will be cleared
of all text and commands. The message "LEARN" will be
displayed at the bottom of the screen.
Any text or commands you type will be stored in the
Temporary Text Buffer. As an example, make a copy of
your 3by5 diskette and erase the file AUTO3BY5.PRG if it
is present. The files REF.3X5 and REFSTYLE.3X5 should
be on the diskette. The default disk drive should be A.
Place the diskette in drive A and type
3by5 <Enter>
The program will be loaded into memory and the 3by5 Title
Screen displayed. Press any key to continue, and the Main
Menu will be displayed. Press <Ctrl-F10> and the message
"LEARN" will be displayed. Next type:
F for the Files Command.
O for the Open Command.
REF <Enter> to open REF.3X5
REFSTYLE <Enter> to open REFSTYLE.3X5.
<Esc> to return to the Main Menu
U for the Utilities Command
L for the Load Command
R to load a Reference Record
2 to select file 2 (REFSTYLE) as
the Reference Style File.
9 <Enter> to select record 9
F for the Files Command
C for the Close Command
2 to close file 2 (REFSTYLE)
<Esc> to return to the Main Menu
169
3by5 Chapter 12
Now press <Ctrl-F10> to turn off the Learn Command.
Then build an AUTO3BY5 file as follows:
Type [F] to for the Files Command, [O] for the Open
Command and then type [AUTO3BY5.PRG] <Enter> The
program will ask if you want to build the file. Type [Y].
Build a file with no fields and a record length of 256
bytes). Edit record one of the file. The record should be
blank and the cursor should be at Line 1 Column 1. Press
<Ctrl-F4> to retrieve the text in the 3by5 temporary
buffer. The text will appear as follows:
foref~refstyle~`ulr29~fc2`
Note that ~ represents the <Enter> key and ` the <Esc>
key.
Save the record: press <Esc> then press S.
Exit 3by5 and then restart the program, the new
AUTO3BY5 file will be loaded and its instructions executed
(files REF.3X5 and REFSTYLE.3X5 will be opened, the
reference style for Science will be loaded into memory and
REFSTYLE.3X5 will be closed). It is not necessary to close
the Reference Style File after loading a reference style.
The Learn Command may also be used to develop macro
commands. Use <Ctrl-F4> to load the commands into a
Macro record that you are editing.
170
MACROS
Macro codes for special key sequences
Key Code Key Code
Alt-A \286 Alt-N \305
Alt-B \304 Alt-O \280
Alt-C \302 Alt-P \281
Alt-D \288 Alt-Q \272
Alt-E \274 Alt-R \275
Alt-F \289 Alt-S \287
Alt-G \290 Alt-T \276
Alt-H \291 Alt-U \278
Alt-I \279 Alt-V \303
Alt-J \292 Alt-W \273
Alt-K \293 Alt-X \301
Alt-L \294 Alt-Y \277
Alt-M \306 Alt-Z \300
Alt-1 \376 Alt-6 \381
Alt-2 \377 Alt-7 \382
Alt-3 \378 Alt-8 \383
Alt-4 \379 Alt-9 \384
Alt-5 \380 Alt-0 \385
Key Code
Ctrl-Cursor Lt \371
Ctrl-Cursor Rt \372
Ctrl-End \373
Ctrl-Pg Down \374
Ctrl-Pg Up \388
Cursor Left \331
Cursor Right \333
Cursor Up \328
Cursor Down \336
Del \339
End \335
Ins \338
Pg Down \337
Pg Up \329
171
3by5 Chapter 12
Key Code Key Code
F1 \315 F6 \320
F2 \316 F7 \321
F3 \317 F8 \322
F4 \318 F9 \323
F5 \319 F10 \324
Shift-F1 \340 Shift-F6 \345
Shift-F2 \341 Shift-F7 \346
Shift-F3 \342 Shift-F8 \347
Shift-F4 \343 Shift-F9 \348
Shift-F5 \344 Shift-F10 \349
Ctrl-F1 \350 Ctrl-F6 \355
Ctrl-F2 \351 Ctrl-F7 \356
Ctrl-F3 \352 Ctrl-F8 \357
Ctrl-F4 \353 Ctrl-F9 \358
Ctrl-F5 \354 Ctrl-F10 \359
Alt-F1 \360 Alt-F6 \365
Alt-F2 \361 Alt-F7 \366
Alt-F3 \362 Alt-F8 \367
Alt-F4 \363 Alt-F9 \368
Alt-F5 \364 Alt-F10 \369
172
MACROS
This page left blank.
173
3by5 Chapter 12
174